package edu.rit.drh4818.fire.data;

import edu.rit.drh4818.fire.emitter.Emitter;
import edu.rit.drh4818.volume.Volume;

/**
 * 
 * 
 * @author Darren Headrick
 *
 */
public class EmitterVolume extends Volume
{

	/**
	 * Emitter for volume.
	 */
	private Emitter emit;
	
	public EmitterVolume(int dimension, boolean animated, String name) {
		super(dimension, animated, name);
	}

	/**
	 * Set the emitter.
	 * @param emit
	 */
	public void setEmitter( Emitter emit )
	{
		this.emit = emit;
	}
	
	/**
	 * Update the data.
	 */
	public void update()
	{
		if( emit != null && volData != null )
		{
			volData = emit.emit( volData );
		}
	}
}
